﻿    using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProjetLabo.Class.Utils
{
    class ConnectionString
    {
        private string dataSource;

        public string DataSource
        {
            get { return dataSource; }
            set { dataSource = value; }
        }

        private string login;

        public string Login
        {
            get { return login; }
            set { login = value; }
        }
        private string password;

        public string Password
        {
            get { return password; }
            set { password = value; }
        }

        private string catalog;

        public string Catalog
        {
            get { return catalog; }
            set { catalog = value; }
        }

        private bool persistSecurityInfo;

        public bool PersistSecurityInfo
        {
            get { return persistSecurityInfo; }
            set { persistSecurityInfo = value; }
        }

        public string getConnectionString()
        {

            return "Data Source="
                   +this.dataSource
                   +";User ID="
                   +this.login
                   +";Password="
                   +this.password
                   +";Initial Catalog="
                   +this.catalog
                   +";Persist Security Info="
                   + this.persistSecurityInfo.ToString();

        }
    }
}
